package org.lex.tinyscript.utils;

import java.io.File;

public class FileOperationUtils {
	public static void moveFile(File from, File to) {
		if (null == from || false == from.exists()) {
			return;
		}
		if (null != to && to.exists()) {
			FileOperationUtils.deleteFile(to);
		}
		from.renameTo(to);
	}

	public static void deleteFile(File file) {
		if (null == file || false == file.exists())
			return;
		file.delete();
	}
}
